<template>
	<view  class="sheet">
		<uv-action-sheet ref="actionSheet" :closeOnClickOverlay="cmk" cancelText="取消"
		:actions="list" @select="select" title="壁纸反馈" @close="close">
		</uv-action-sheet>
	</view>
<!-- 
	<popuoSheet ref="popuoSheet"></popuoSheet> 
	
	import popuoSheet from '../popup-sheet/popup-sheet.vue'
	<button @click="popuoSheetRef.open"></button>
	const popuoSheetRef = ref(null)
-->
</template>
<script setup>
	import {
		defineExpose,
		ref
	} from 'vue';
	const list = [ {
		name: '图像侵权'
	}, {
		name: '引起不适'
	}, {
		name: '其他'
	}]
	
	// 是否可以点击关闭
	const cmk = ref(false)
	const actionSheet = ref(null)
	const open = () => {
		actionSheet.value.actions.map(item => {
			item.disabled = true
		})
		setTimeout(()=>{
			actionSheet.value.actions.map(item => {
				item.disabled = false
			})
			cmk.value = true
		}, 500)
		actionSheet.value.open();
	}
	
	const select = (e) => {
		console.log('选中该项：', e);
	}
	const close = () => {
		console.log('关闭');
		cmk.value = false
	}
	defineExpose({
		open
	})
</script>

<style scoped lang="scss">
	.sheet{
		z-index: 999;
		position: relative;
	}
</style>